<%@ page import="java.util.ArrayList" %>
<%@ page import="Semester_3.src.Util_7.User" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/10/24
  Time: 19:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>测试JSTL</title>
</head>
<body>
<%
    ArrayList<User> Users = new ArrayList<>();
    Users.add(new User("张三","123"));
    Users.add(new User("李四","456"));
    Users.add(new User("王五","456"));
    request.setAttribute("Users",Users);
%>
<c:forEach items="${Users}" var="User">
    <p>用户名为：${User.name}</p>
    <p>密码为：${User.password}</p>
</c:forEach>
<hr>
<c:forEach begin="0" step="1" end="10" var="i">
    <p>${i}</p>
</c:forEach>
<hr>
<c:url var="myurl" value="/ServletDemo15">
    <c:param name="name" value="张三">
        
    </c:param>
</c:url>
<a href="${myurl}">点击链接</a>
</body>
</html>
